import json
from typing import List, Dict, Any
from classes.PageElement import PageElement

class PageElementFactory:
    """自动生成页面元素类，可扩展为解析页面自动生成"""
    @staticmethod
    def from_dicts(element_dicts: List[Dict[str, str]]) -> List[PageElement]:
        return [PageElement(**elem) for elem in element_dicts]
 